#ifndef MLIR_TOOLS_WAFER_LIB_PRAGMAHANDLER_H
#define MLIR_TOOLS_WAFER_LIB_PRAGMAHANDLER_H

#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Sema.h"


#include "clang/Basic/TokenKinds.h"
#include "clang/Lex/Token.h"
#include "clang/Lex/Pragma.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/Support/raw_ostream.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendPluginRegistry.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Verifier.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Frontend/FrontendAction.h"



#include "llvm/ADT/DenseMap.h"

using namespace mlir;
using namespace clang;

namespace wafer_guard
{
  extern llvm::SmallVector<const IdentifierInfo*, 2> ArgsToEnclosed;
  extern llvm::SmallVector<unsigned> pragmaLineNumber;
  extern bool WaferParallelStat;
}


namespace{

class WaferPragma : public PragmaHandler
{
  public:
    WaferPragma() : PragmaHandler("wafer") {}

    void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &PragmaTok) override;
};
  
}
void addPragmaWaferHandlers(clang::Preprocessor &PP);

#endif
